package com.mallcloud.mall.app.controller;

import com.mallcloud.mall.common.core.util.R;
import com.mallcloud.mall.mall.api.entity.MallStoreModel;
import com.mallcloud.mall.mall.service.MallStoreService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "app-门店")
@RestController
@AllArgsConstructor
@RequestMapping("/app/store")
public class AppStoreController {
    private final MallStoreService mallStoreService;

    @ApiOperation("门店列表")
    @GetMapping("/list")
    public R<List<MallStoreModel>> getList(MallStoreModel dto) {
        return R.ok(mallStoreService.listStore(dto));
    }

    @ApiOperation("查询门店")
    @GetMapping("/getInfo")
    public R<MallStoreModel> getInfo(MallStoreModel dto) {
        return R.ok(mallStoreService.getInfo(dto));
    }
}
